#ifndef CELL_H
#define CELL_H

#include "MoveableObj.h"

class Diamond;
class Board;
class ZoomEffect;
class Texture;

#define EMPTY_CELL_LOCK_ID 9

enum CELL_STATE
{
	CLS_NORMAL,
	CLS_CHANGING,
};

class Cell:MoveableObj
{
private:
	int lock;
	Diamond* diamond;
	Board* board;
	Vector* posInBoard;
	ZoomEffect* zoomEffect;
	bool isAvailable;			//if it is available, it can contain diamond.
	Texture* tEmptyCell;

public:
	Cell();
	Cell(int lock, int xInBoard, int yInBoard, Board* board);

	void Update();
	void Render();

	void DecreaseLock();

	~Cell();

	void SetDiamond(Diamond* diamond);
	void SetLock(int lock);
	void SetState(int state);
	void SetIsAvailable(int isAvailable);

	int GetLock(){return lock;}
	Diamond* GetDiamond(){return diamond;};
	Diamond** GetDiamondPointer(){return &diamond;};
	Vector* GetPosInBoard(){return posInBoard;}
	int GetIsAvailable(){return isAvailable;}
};

#endif